#include<stdio.h>

int main()
{
    int nums[]={2,3,5,6,9,13,14};
    int n;
    scanf("%d",&n);
    for(int i=0;i<sizeof(nums)/4;i++)
    {
        if(nums[i]==n)
        printf("%d\n",i);
        else if(nums[i]<n&&n<nums[i+1])
        printf("%d\n",i+1);
    }
}